# -*- coding: utf-8 -*-
'''
@author: Hugo
@file: tests.py
@time: 2021/9/13 19:34
'''
from bs4 import BeautifulSoup
url = 'https://www.amazon.cn/gp/bestsellers/digital-text/116169071/ref=sv_kinc_4'
import requests

headers = {
    'Cookie': 'session-id=459-5069130-8750562; i18n-prefs=CNY; ubid-acbcn=458-3172129-1036728; session-token=AYMlFrnQIkRBhZI9zuTJTIkph9mpr7wTauB5sHvUHmzuTAzDYaXWUVsj1JtLYo27LL4dHYnnHNvWU7GjT81PIWU+FGA+MnFm8gdME8jNt0hdwTcKvuqvTs4JrRHaouYz1IcPKHdP+fpm0s/GOqxdMsq3Pv8bZPaEy4oxgTNbjH/fAuodVO6iLmpCmogETvMI; session-id-time=2082729601l; csm-hit=tb:X8TS00KJ96S2175MKTCE+s-FVF6E4XZ0GWPX0ZKYHX5|1631533792096&t:1631533792096&adb:adblk_no',
    'Referer': 'https://www.amazon.cn/gp/bestsellers/digital-text/144154071/ref=zg_bs_nav_kinc_2_116169071',
}

for i in range(11):
    res = requests.get(url)
    print(res)
    bs4 = BeautifulSoup(res.text,'lxml')
    print(bs4.title)
